import axios from '../utils/request'

// 获取所有权限点
export function Getallpermission() {
  return axios({
    url: '/sys/permission'
  })
}
// 删除权限接口
export function delPerm(id) {
  return axios({
    url: `/sys/permission/${id}`,
    method: 'delete'
  })
}

// 根据id获取权限接口
export function getPermDetail(id) {
  return axios({
    url: `/sys/permission/${id}`
  })
}

// 根据ID更新权限点详情
export function Theeditor(data) {
  return axios({
    url: `/sys/permission/${data.id}`,
    method: 'put',
    data
  })
}

// 添加权限点接口
export function addPerm(data) {
  return axios({
    method: 'post',
    url: '/sys/permission',
    data
  })
}
